Skip to content

Conversation

@laride
Copy link
Collaborator

@laride laride commented Sep 28, 2025

简介

当前 PR 重构原有的摄像头部分,使用 esp_video 组件替代 esp32-camera 组件,使用 esp_new_jpeg 组件实现软件 JPEG Encode。

相比 esp32-camera ,esp_video 支持更多接口:esp_video 支持 MIPI-CSI、ISP、USB (P4 Only)、DVP (P4/S3)、SPI (P4/S3/C3/C5/C6/C61) 接口的视频输入设备。

当前 PR 是支持 P4 MIPI-DSI 摄像头的前置条件。

开发版迁移指南

当前 PR 已经将所有使用摄像头组件的开发版改为使用 esp_video API

  • 已测试的开发版在 refactor: migrate boards to esp-video API (1/2) commit 中;
  • 未测试的开发版在 refactor: migrate boards to esp-video API (2/2) commit 中。所有未测试的开发版只修改了 API 调用(摄像头配置生成)部分,仍需进行额外配置(下方1~2步和第4步)。
  1. 确认摄像头传感器型号,确定型号在 esp_cam_sensor 支持的范围内。
  2. 在 menuconfig 中启用对应型号的支持:
    1. 打开 (Top)Component configEspressif Camera Sensors ConfigurationsCamera Sensor ConfigurationSelect and Set Camera Sensor
    2. 选中所需的传感器型号;
    3. 进入传感器详细设置,启用 Auto detect,推荐将 default output format 调整为 YUV422 及合适的分辨率大小。(目前支持 YUV422、RGB565,YUV422 更节省内存空间)
    4. 将上述变更写入对应开发版的 config.json
  3. 参考 main/boards/atoms3r-cam-m12-echo-base/atoms3r_cam_m12_echo_base.cc(创建新的 I2C bus)或 main/boards/esp-sparkbot/esp_sparkbot_board.cc(复用现有的 I2C bus)初始化摄像头。
  4. 测试屏幕上的摄像头预览,并查看小智后台聊天历史记录中的图像是否正确。
    • 如果色彩明显有问题但轮廓大致正确,请尝试开关 (Top)Component configEspressif Camera Sensors ConfigurationsCamera Sensor ConfigurationEnable pixel byte order swapping 选项(如果存在此选项)。
    • 如果不存在 Enable pixel byte order swapping 选项,请尝试开关 (Top)Xiaozhi AssistantCamera ConfigurationEnable software camera buffer endianness swapping (USE WITH CAUTION) 选项。
    • 将修改后的 sdkconfig 写入 config.json

其他破坏性更新

  • 最低 IDF 版本为 5.5。
  • 编译前,需要先启用 esp_cam_sensor 对所用传感器的支持,详见迁移指南。
  • esp_cam_sensor 不支持 OV3660 传感器,但 AtomS3R M12 使用了 OV3660 传感器。

关联信息

@laride laride force-pushed the refactor/use-esp-video branch 2 times, most recently from 77fc210 to ce624a7 Compare September 29, 2025 04:03
@78
Copy link
Owner

78 commented Sep 29, 2025

可以对比一下替换前后的内存使用情况?

这个改动有点大,有哪些板子需要安排测试的,我可以联系一下。

@laride
Copy link
Collaborator Author

laride commented Sep 29, 2025

可以对比一下替换前后的内存使用情况?

数据我稍迟测一下。

这个改动有点大,有哪些板子需要安排测试的,我可以联系一下。

我需要修改一下配置-测试说明。目前 S3 适配已经接近尾声了,等配置-测试说明改完就可以测。

当前主要在适配 P4 Hardware JPEG Encoder,P4 的测试还没有开始。

@laride
Copy link
Collaborator Author

laride commented Sep 30, 2025

测试环境均为 SparkBot,均使用 240*240 分辨率 RGB565

I (19105) SystemInfo: free sram: 102071 minimal sram: 96911 # 拍照前
I (19225) SystemInfo: free sram: 97031 minimal sram: 96011  # 拍照后
I (19275) SystemInfo: free sram: 63719 minimal sram: 62787  # JPEG Encode 中
I (19285) SystemInfo: free sram: 94975 minimal sram: 62575  # JPEG Encode 后
I (27765) SystemInfo: free sram: 102055 minimal sram: 61795 # 图像识别结束,录音状态
remain stack size=6052
I (22824) SystemInfo: free sram: 89303 minimal sram: 82351  # 拍照前
I (22904) SystemInfo: free sram: 90031 minimal sram: 82351  # 拍照后
I (23004) SystemInfo: free sram: 83347 minimal sram: 79055  # JPEG Encode 后
I (31694) SystemInfo: free sram: 90659 minimal sram: 70931  # 图像识别结束,录音状态
remain stack size=6104

esp_new_jpeg 在 JPEG Encode 时性能更好但是确实会多占用约 10k 内存,这部分 @78 考虑选哪一个软件编码?

@78
Copy link
Owner

78 commented Sep 30, 2025

@laride 我提议 esp_new_jpeg 组件提供一个编译选项,可以使用动态内存。目前多出来的这 10多 k内存是 static 变量导致的,应该在创建 jpeg object 的时候申请 SRAM 内存,而不是一直占用。

@laride
Copy link
Collaborator Author

laride commented Sep 30, 2025

目前多出来的这 10多 k内存是 static 变量导致的,应该在创建 jpeg object 的时候申请 SRAM 内存,而不是一直占用。

不会一直占用的,JPEG Encode 结束就会释放。我们正在尝试做一些额外的优化

@Kevincoooool
Copy link
Contributor

我觉得很棒!

@78
Copy link
Owner

78 commented Sep 30, 2025

目前多出来的这 10多 k内存是 static 变量导致的,应该在创建 jpeg object 的时候申请 SRAM 内存,而不是一直占用。

不会一直占用的,JPEG Encode 结束就会释放。我们正在尝试做一些额外的优化

从拍照前的内存使用来看是少了12KB呢,你可以 idf.py size-files (IIRC) 来看到这个组件的 SRAM 的占用

@laride
Copy link
Collaborator Author

laride commented Sep 30, 2025

从拍照前的内存使用来看是少了12KB呢

识别完就释放了,这个是拍照 - JPEG Encode - 上传 - 清理完整的占用

@laride
Copy link
Collaborator Author

laride commented Sep 30, 2025

                                                                                                  Per-file contributions to ELF file                                                                                                  
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━┳━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Object File                                                     ┃ Total Size ┃ DIRAM ┃ .bss ┃ .data ┃ .text ┃ .vectors ┃ Flash Code ┃  .text ┃ Flash Data ┃ .rodata ┃ .appdesc ┃ RTC FAST ┃ .rtc_reserved ┃ RTC SLOW ┃ .force_slow ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━╇━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ esp_video.c.obj                                                 │       4509 │   328 │    8 │     0 │   320 │        0 │       3725 │   3725 │        456 │     456 │        0 │        0 │             0 │        0 │           0 │
│ esp_video_cam.c.obj                                             │       2113 │     0 │    0 │     0 │     0 │        0 │       2017 │   2017 │         96 │      96 │        0 │        0 │             0 │        0 │           0 │
│ esp_video_dvp_device.c.obj                                      │       1716 │    52 │    0 │     0 │    52 │        0 │       1494 │   1494 │        170 │     170 │        0 │        0 │             0 │        0 │           0 │
│ esp_video_ioctl.c.obj                                           │       1160 │     0 │    0 │     0 │     0 │        0 │       1144 │   1144 │         16 │      16 │        0 │        0 │             0 │        0 │           0 │
│ esp_video_init.c.obj                                            │       1046 │    32 │   32 │     0 │     0 │        0 │        972 │    972 │         42 │      42 │        0 │        0 │             0 │        0 │           0 │
│ esp_video_vfs.c.obj                                             │       1011 │     0 │    0 │     0 │     0 │        0 │        708 │    708 │        303 │     303 │        0 │        0 │             0 │        0 │           0 │
│ esp_video_buffer.c.obj                                          │        322 │    47 │    0 │     0 │    47 │        0 │        275 │    275 │          0 │       0 │        0 │        0 │             0 │        0 │           0 │
│ esp_video_mman.c.obj                                            │         36 │     0 │    0 │     0 │     0 │        0 │         36 │     36 │          0 │       0 │        0 │        0 │             0 │        0 │           0 │
│ jpeg_enc_dct.S.obj                                              │       8875 │  8875 │    0 │     0 │  8875 │        0 │          0 │      0 │          0 │       0 │        0 │        0 │             0 │        0 │           0 │
│ jpeg_enc_process.c.obj                                          │       6900 │   448 │    0 │   448 │     0 │        0 │       5770 │   5770 │        682 │     682 │        0 │        0 │             0 │        0 │           0 │
│ jpeg_enc_color.c.obj                                            │       2217 │     0 │    0 │     0 │     0 │        0 │       2181 │   2181 │         36 │      36 │        0 │        0 │             0 │        0 │           0 │
│ jpeg_enc_huff.c.obj                                             │       2135 │     0 │    0 │     0 │     0 │        0 │       2071 │   2071 │         64 │      64 │        0 │        0 │             0 │        0 │           0 │
│ jpeg_enc_marker.c.obj                                           │       1818 │     0 │    0 │     0 │     0 │        0 │       1480 │   1480 │        338 │     338 │        0 │        0 │             0 │        0 │           0 │
│ jpeg_enc_dct.c.obj                                              │       1068 │     0 │    0 │     0 │     0 │        0 │        968 │    968 │        100 │     100 │        0 │        0 │             0 │        0 │           0 │
│ image_to_jpeg.cpp.obj                                           │       1047 │     0 │    0 │     0 │     0 │        0 │        931 │    931 │        116 │     116 │        0 │        0 │             0 │        0 │           0 │
│ jpeg_enc_utils.S.obj                                            │        924 │   924 │    0 │     0 │   924 │        0 │          0 │      0 │          0 │       0 │        0 │        0 │             0 │        0 │           0 │
│ esp_jpeg_enc.c.obj                                              │        632 │     0 │    0 │     0 │     0 │        0 │        632 │    632 │          0 │       0 │        0 │        0 │             0 │        0 │           0 │
│ esp_jpeg_memory.c.obj                                           │        180 │     0 │    0 │     0 │     0 │        0 │        180 │    180 │          0 │       0 │        0 │        0 │             0 │        0 │           0 │
└─────────────────────────────────────────────────────────────────┴────────────┴───────┴──────┴───────┴───────┴──────────┴────────────┴────────┴────────────┴─────────┴──────────┴──────────┴───────────────┴──────────┴─────────────┘

另外做了一些额外的处理,现在

I (19775) SystemInfo: free sram: 102487 minimal sram: 98303 # 拍照前
I (33775) SystemInfo: free sram: 102183 minimal sram: 83151 # 拍照、上传、清理结束后

拍照后最低 sram 会比原有的软件编码还高一些

@laride laride changed the title Refactor: Use esp_video compoenet Refactor: Use esp_video component Sep 30, 2025
@78
Copy link
Owner

78 commented Sep 30, 2025

I (19775) SystemInfo: free sram: 102487 minimal sram: 98303 # 拍照前
I (33775) SystemInfo: free sram: 102183 minimal sram: 83151 # 拍照、上传、清理结束后

这个就很好了!

@laride
Copy link
Collaborator Author

laride commented Sep 30, 2025

这个改动有点大,有哪些板子需要安排测试的,我可以联系一下。

ESP-SparkBot / AtomS3R CAM / M5Stack Core S3 我们自行测试,需要测试一下其他各个带摄像头的开发版,辛苦了。

S3 部分应该不会再有大改动,节后会继续适配 P4。

@laride laride force-pushed the refactor/use-esp-video branch from 67f16eb to 6c9f9d1 Compare October 10, 2025 11:52
@laride laride marked this pull request as ready for review October 10, 2025 12:18
@laride
Copy link
Collaborator Author

laride commented Oct 10, 2025

PTAL @78

@78
Copy link
Owner

78 commented Oct 10, 2025

为什么没有触发 workflow action 的?

@laride
Copy link
Collaborator Author

laride commented Oct 11, 2025

为什么没有触发 workflow action 的?

触发了,跑完了


> ![NOTE]
>
> 自版本 [待定] 起,由于依赖库不支持 OV3660 传感器,AtomS3R M12 无法使用摄像头识别功能。
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果合的话,这里需要改成实际的版本

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

意思是合并这个版本之后,暂时无法支持这个板子的摄像头对吗

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对。

这个固件会同时用于 AtomS3R Cam (GC0308) 和 AtomS3R M12 (OV3660),前者可以正常使用摄像头,后者由于暂不支持该 sensor 故暂时无法使用摄像头。

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OV3660 将在近期添加到 esp-video. 但是大批量的商用项目不建议将 OV3660 作为优先级高的 sensor 选型。

@78 78 merged commit 60ad1c5 into 78:main Oct 14, 2025
97 checks passed
@78
Copy link
Owner

78 commented Oct 14, 2025

S3 的话,尝试在 menuconfig 中降低些 XCLK。 此外,检查其他配置,确保 S3 使用 Flash QIO、Oct PSRAM、CPU 240M,这样增加数据带宽能力。

S3 使用 Flash QIO、Oct PSRAM、CPU 240M:已确认均已开启。

XCLK:目前是 24M,我改为 20M 后,测试 CONFIG_CAMERA_GC0308_DVP_YUV422_640X480_16FPS 已经有很大的好转。但是 CONFIG_CAMERA_GC0308_DVP_RGB565_640X480_16FPS 和 CONFIG_CAMERA_GC0308_DVP_RGB565_320X240_20FPS 还是花屏,是不是 @laride 内存拷贝出了问题?

@WangYuxin-esp
Copy link

RGB565 格式在 esp_new_jpeg 组件中不支持。正在加。

@WangYuxin-esp
Copy link

S3 的话,尝试在 menuconfig 中降低些 XCLK。 此外,检查其他配置,确保 S3 使用 Flash QIO、Oct PSRAM、CPU 240M,这样增加数据带宽能力。

S3 使用 Flash QIO、Oct PSRAM、CPU 240M:已确认均已开启。

XCLK:目前是 24M,我改为 20M 后,测试 CONFIG_CAMERA_GC0308_DVP_YUV422_640X480_16FPS 已经有很大的好转。但是 CONFIG_CAMERA_GC0308_DVP_RGB565_640X480_16FPS 和 CONFIG_CAMERA_GC0308_DVP_RGB565_320X240_20FPS 还是花屏,是不是 @laride 内存拷贝出了问题?

RGB565 格式在 esp_new_jpeg 中不支持,还在推动增加支持。使用 JPEG 的情况下,先使用 YUV422。

@78
Copy link
Owner

78 commented Oct 14, 2025

image

OV2640,没有 YUV422 320x240 这个选项,这个 JPEG 320x240 是否可以使用?

@laride
Copy link
Collaborator Author

laride commented Oct 14, 2025

JPEG 涉及解码,目前的路线暂时没有做 JPEG 解码,后续会随一些新的 feature 加上 JPEG 解码支持。

@WangYuxin-esp
Copy link

JPEG mode 的在 P4 上能用,S3 上的 JPEG 模式,DVP 驱动还在开发状态。

@laride
Copy link
Collaborator Author

laride commented Oct 14, 2025

可以尝试在

// 保存帧副本到PSRAM

加一行

vTaskDelay(100 / portTICK_PERIOD_MS);

或者按前述降低一些 XCLK

@laride
Copy link
Collaborator Author

laride commented Oct 14, 2025

S3 的话,尝试在 menuconfig 中降低些 XCLK。 此外,检查其他配置,确保 S3 使用 Flash QIO、Oct PSRAM、CPU 240M,这样增加数据带宽能力。

S3 使用 Flash QIO、Oct PSRAM、CPU 240M:已确认均已开启。

XCLK:目前是 24M,我改为 20M 后,测试 CONFIG_CAMERA_GC0308_DVP_YUV422_640X480_16FPS 已经有很大的好转。但是 CONFIG_CAMERA_GC0308_DVP_RGB565_640X480_16FPS 和 CONFIG_CAMERA_GC0308_DVP_RGB565_320X240_20FPS 还是花屏,是不是 @laride 内存拷贝出了问题?

可以给个花屏的图吗

@78
Copy link
Owner

78 commented Oct 14, 2025

S3 的话,尝试在 menuconfig 中降低些 XCLK。 此外,检查其他配置,确保 S3 使用 Flash QIO、Oct PSRAM、CPU 240M,这样增加数据带宽能力。

S3 使用 Flash QIO、Oct PSRAM、CPU 240M:已确认均已开启。
XCLK:目前是 24M,我改为 20M 后,测试 CONFIG_CAMERA_GC0308_DVP_YUV422_640X480_16FPS 已经有很大的好转。但是 CONFIG_CAMERA_GC0308_DVP_RGB565_640X480_16FPS 和 CONFIG_CAMERA_GC0308_DVP_RGB565_320X240_20FPS 还是花屏,是不是 @laride 内存拷贝出了问题?

可以给个花屏的图吗

image

@laride
Copy link
Collaborator Author

laride commented Oct 14, 2025

S3 的话,尝试在 menuconfig 中降低些 XCLK。 此外,检查其他配置,确保 S3 使用 Flash QIO、Oct PSRAM、CPU 240M,这样增加数据带宽能力。

S3 使用 Flash QIO、Oct PSRAM、CPU 240M:已确认均已开启。
XCLK:目前是 24M,我改为 20M 后,测试 CONFIG_CAMERA_GC0308_DVP_YUV422_640X480_16FPS 已经有很大的好转。但是 CONFIG_CAMERA_GC0308_DVP_RGB565_640X480_16FPS 和 CONFIG_CAMERA_GC0308_DVP_RGB565_320X240_20FPS 还是花屏,是不是 @laride 内存拷贝出了问题?

可以给个花屏的图吗

image

看上去是字节序处理不对,有 menuconfig 选项可以处理字节序。

启用 (Top) → Component config → Espressif Camera Sensors Configurations → Camera Sensor Configuration 的 Enable pixel byte order swapping 选项(如果存在此选项)。

如果没有这个选项,或者打开后没有效果,则禁用 Enable pixel byte order swapping 选项,启用 (Top) → Xiaozhi Assistant → Camera Configuration 的 Enable software camera buffer endianness swapping (USE WITH CAUTION) 选项。

@78
Copy link
Owner

78 commented Oct 14, 2025

S3 的话,尝试在 menuconfig 中降低些 XCLK。 此外,检查其他配置,确保 S3 使用 Flash QIO、Oct PSRAM、CPU 240M,这样增加数据带宽能力。

S3 使用 Flash QIO、Oct PSRAM、CPU 240M:已确认均已开启。
XCLK:目前是 24M,我改为 20M 后,测试 CONFIG_CAMERA_GC0308_DVP_YUV422_640X480_16FPS 已经有很大的好转。但是 CONFIG_CAMERA_GC0308_DVP_RGB565_640X480_16FPS 和 CONFIG_CAMERA_GC0308_DVP_RGB565_320X240_20FPS 还是花屏,是不是 @laride 内存拷贝出了问题?

可以给个花屏的图吗

image

看上去是字节序处理不对,有 menuconfig 选项可以处理字节序。

启用 (Top) → Component config → Espressif Camera Sensors Configurations → Camera Sensor Configuration 的 Enable pixel byte order swapping 选项(如果存在此选项)。

如果没有这个选项,或者打开后没有效果,则禁用 Enable pixel byte order swapping 选项,启用 (Top) → Xiaozhi Assistant → Camera Configuration 的 Enable software camera buffer endianness swapping (USE WITH CAUTION) 选项。

这个方法可行。
看来是 Enable pixel byte order swapping 没有起作用。

这个方法能修复花屏问题:Xiaozhi Assistant → Camera Configuration 的 Enable software camera buffer endianness swapping (USE WITH CAUTION) 选项 @HonestQiao

另外,麻烦 @laride @WangYuxin-esp 看看 #1291 这个提到的是否 BUG。

@konglingboy
Copy link
Contributor

konglingboy commented Oct 15, 2025

测试硬件:P4+OV02C10(MIPI-CSI)
配置:
CONFIG_CAMERA_OV02C10=y
CONFIG_CAMERA_OV02C10_AUTO_DETECT=y
CONFIG_CAMERA_OV02C10_AUTO_DETECT_MIPI_INTERFACE_SENSOR=y
CONFIG_CAMERA_OV02C10_MIPI_RAW10_1288x728_30FPS=y

可驱动并运行, 但是屏幕预览和上传的图像均偏绿色。该摄像头驱动的像素格式为V4L2_PIX_FMT_VYUY,不是预设的V4L2_PIX_FMT_YUYV。

YUV422有多个像素格式变体,如YUYV、YYUV、YVYU等,建议考虑进去。

@laride
Copy link
Collaborator Author

laride commented Oct 16, 2025

YUV422有多个像素格式变体,如YUYV、YYUV、YVYU等,建议考虑进去。

目前给小智 PR 的代码暂时只适配了比较常见的颜色格式,如果有额外需要您也可以帮忙完善代码。

对于 P4,可以考虑使用 RGB565 输出,在小智项目的预览阶段负载更小。在后续的 PR 中会有基于芯片能力的颜色格式优先级选择。

P4+OV02C10(MIPI-CSI)可驱动并运行, 但是屏幕预览和上传的图像均偏绿色。

这块 Sensor 似乎还没有被 esp_cam_sensor 支持,缺少 ISP 配置文件,因此颜色与实际颜色具有一定区别。注意到 https://github.com/espressif/esp-video-components PR 46 正在添加 OV02C10,可以先尝试使用该 PR 提供的 ISP 配置文件。

Wvirgil123 added a commit to Wvirgil123/xiaozhi-esp32 that referenced this pull request Oct 20, 2025
* main:
  Add 16 more languages to locales (78#1297)
  Fix LilyGo-T-CameraPlus-S3 Camera (78#1295)
  Fix lichuang-dev camera (78#1290)
  将太极派新款和旧款分离 (78#1287)
  Refactor: Use esp_video component (78#1245)
  add support for Wireless-Tag WTP4C5MP07S ESP32P4 board + 7 inch MIPI DSI LCD display combo (78#1281)
  Optimize AdcBatteryMonitor to work without charge detection pin. (78#1276)
  enable rrti for m5stack-tab5 (78#1268)
  Add LILYGO T-Display-P4 board adaptation (78#1269)
  Added Waveshare ESP32-P4-WIFI6-Touch-LCD-7B third party board (78#1243)
  Add esp32c5 configuration (78#1258)
  Change the button array to ADC buttons as in the board for esp32s3-korv2 (78#1256)
  Add SetInputGain(float gain) to AudioCodec (78#1252)
  Update README (78#1251)
@konglingboy
Copy link
Contributor

konglingboy commented Oct 21, 2025

测试硬件:esp32-s3-touch-lcd-3.5+ov2640, 使用 release.py esp32-s3-touch-lcd-3.5 完全编译时出现如下错误:
`K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc: In member function 'void CustomBoard::InitializeCamera()':

K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc:177:16: error: 'esp_cam_ctlr_dvp_pin_config_t' does not name a type
177 | static esp_cam_ctlr_dvp_pin_config_t dvp_pin_config = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc:195:9: error: 'esp_video_init_sccb_config_t' was not declared in this scope; did you mean 'esp_video_init_config_t'?
195 | esp_video_init_sccb_config_t sccb_config = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| esp_video_init_config_t

K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc:201:9: error: 'esp_video_init_dvp_config_t' was not declared in this scope; did you mean 'esp_video_init_config_t'?
201 | esp_video_init_dvp_config_t dvp_config = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| esp_video_init_config_t

K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc:210:21: error: 'dvp_config' was not declared in this scope
210 | .dvp = &dvp_config,
| ^~~~~~~~~~
ninja: build stopped: subcommand failed.`

@78
Copy link
Owner

78 commented Oct 21, 2025

测试硬件:esp32-s3-touch-lcd-3.5+ov2640, 使用 release.py esp32-s3-touch-lcd-3.5 完全编译时出现如下错误: `K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc: In member function 'void CustomBoard::InitializeCamera()':

K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc:177:16: error: 'esp_cam_ctlr_dvp_pin_config_t' does not name a type 177 | static esp_cam_ctlr_dvp_pin_config_t dvp_pin_config = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc:195:9: error: 'esp_video_init_sccb_config_t' was not declared in this scope; did you mean 'esp_video_init_config_t'? 195 | esp_video_init_sccb_config_t sccb_config = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | esp_video_init_config_t

K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc:201:9: error: 'esp_video_init_dvp_config_t' was not declared in this scope; did you mean 'esp_video_init_config_t'? 201 | esp_video_init_dvp_config_t dvp_config = { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ | esp_video_init_config_t

K:/OpenSource/Aida64/xiaozhi-esp32/main/boards/esp32-s3-touch-lcd-3.5/esp32-s3-touch-lcd-3.5.cc:210:21: error: 'dvp_config' was not declared in this scope 210 | .dvp = &dvp_config, | ^~~~~~~~~~ ninja: build stopped: subcommand failed.`

试试 IDF 5.5.1

@genvex
Copy link

genvex commented Nov 2, 2025

df k10 的摄像头是 gc2145 也只有RGB640*480 没法正常使用。

@WangYuxin-esp
Copy link

df k10 的摄像头是 gc2145 也只有RGB640*480 没法正常使用。

无法使用具体是指什么?无法出数据,还是出数据,但是颜色、形状不对。

@genvex
Copy link

genvex commented Nov 3, 2025

df k10 的摄像头是 gc2145 也只有RGB640*480 没法正常使用。

无法使用具体是指什么?无法出数据,还是出数据,但是颜色、形状不对。

跟虾哥测试结果差不多,没有YUV选项,只有RGB ,mcp拍照 能拍照,但花屏,颜色,形状不对,开启和关闭颜色swap没什么变化,更换更高的分辨率也同样。

@laride
Copy link
Collaborator Author

laride commented Nov 3, 2025

没有YUV选项,只有RGB ,mcp拍照 能拍照,但花屏,颜色,形状不对,开启和关闭颜色swap没什么变化,更换更高的分辨率也同样。

启用 XIAOZHI_ENABLE_CAMERA_DEBUG_MODE 截一下初始化阶段的 log,另外传一下花屏的图片

@genvex
Copy link

genvex commented Nov 3, 2025

没有YUV选项,只有RGB ,mcp拍照 能拍照,但花屏,颜色,形状不对,开启和关闭颜色swap没什么变化,更换更高的分辨率也同样。

启用 XIAOZHI_ENABLE_CAMERA_DEBUG_MODE 截一下初始化阶段的 log,另外传一下花屏的图片

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403834fa
--- 0x403834fa: esp_cpu_wait_for_intr at E:/IDF_home/idf55_offline/frameworks/esp-idf-v5.5.1/components/esp_hw_support/cpu.c:64

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x548
load:0x403c8700,len:0xc3c
load:0x403cb700,len:0x2e70
entry 0x403c8908
I (26) octal_psram: vendor id : 0x0d (AP)
I (26) octal_psram: dev id : 0x02 (generation 3)
I (26) octal_psram: density : 0x03 (64 Mbit)
I (28) octal_psram: good-die : 0x01 (Pass)
I (32) octal_psram: Latency : 0x01 (Fixed)
I (36) octal_psram: VCC : 0x01 (3V)
I (40) octal_psram: SRF : 0x01 (Fast Refresh)
I (45) octal_psram: BurstType : 0x01 (Hybrid Wrap)
I (50) octal_psram: BurstLen : 0x01 (32 Byte)
I (54) octal_psram: Readlatency : 0x02 (10 cycles@Fixed)
I (59) octal_psram: DriveStrength: 0x00 (1/1)
I (64) MSPI Timing: PSRAM timing tuning index: 5
I (68) esp_psram: Found 8MB PSRAM device
I (71) esp_psram: Speed: 80MHz
I (74) cpu_start: Multicore app
I (89) cpu_start: Pro cpu start user code
I (89) cpu_start: cpu freq: 240000000 Hz
I (89) app_init: Application information:
I (89) app_init: Project name: xiaozhi
I (92) app_init: App version: 2.0.4
I (96) app_init: Compile time: Nov 3 2025 11:53:54
I (101) app_init: ELF file SHA256: e25f2ec80...
I (105) app_init: ESP-IDF: v5.5.1
I (109) efuse_init: Min chip rev: v0.0
I (113) efuse_init: Max chip rev: v0.99
I (117) efuse_init: Chip rev: v0.2
I (121) heap_init: Initializing. RAM available for dynamic allocation:
I (127) heap_init: At 3FCB01F0 len 00039520 (229 KiB): RAM
I (132) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (137) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (143) heap_init: At 600FE000 len 00001FD8 (7 KiB): RTCRAM
I (148) esp_psram: Adding pool of 8192K of PSRAM memory to heap allocator
I (155) spi_flash: detected chip: gd
I (158) spi_flash: flash io: qio
I (161) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (167) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (174) main_task: Started on CPU0
I (184) esp_psram: Reserving pool of 64K of internal memory for DMA/internal allocations
I (184) main_task: Calling app_main()
I (214) Board: UUID=d8ad865a-6a08-4cd0-b587-835c7ebe7d32 SKU=df-k10
I (214) io_expander: Index[0] | Dir[In] | In[0] | Out[1]
I (214) io_expander: Index[1] | Dir[In] | In[1] | Out[1]
I (214) io_expander: Index[2] | Dir[In] | In[1] | Out[1]
I (224) io_expander: Index[3] | Dir[In] | In[0] | Out[1]
I (224) io_expander: Index[4] | Dir[In] | In[0] | Out[1]
I (234) io_expander: Index[5] | Dir[In] | In[0] | Out[1]
I (234) io_expander: Index[6] | Dir[In] | In[0] | Out[1]
I (244) io_expander: Index[7] | Dir[In] | In[0] | Out[1]
I (244) io_expander: Index[8] | Dir[In] | In[0] | Out[1]
I (254) io_expander: Index[9] | Dir[In] | In[0] | Out[1]
I (254) io_expander: Index[10] | Dir[In] | In[0] | Out[1]
I (264) io_expander: Index[11] | Dir[In] | In[0] | Out[1]
I (264) io_expander: Index[12] | Dir[In] | In[1] | Out[1]
I (274) io_expander: Index[13] | Dir[In] | In[0] | Out[1]
I (274) io_expander: Index[14] | Dir[In] | In[0] | Out[1]
I (284) io_expander: Index[15] | Dir[In] | In[1] | Out[1]
I (284) ili9341: LCD panel create success, version: 1.2.0
I (414) Display: Power management not supported
I (474) LcdDisplay: Turning display on
I (474) LcdDisplay: Initialize LVGL library
I (474) LcdDisplay: Use 2MB of PSRAM for image cache
I (474) LcdDisplay: Initialize LVGL port
I (484) LcdDisplay: Adding LCD display
I (484) LVGL: Starting LVGL task
I (494) button: IoT Button Version: 4.1.4
W (494) CircularStrip: Unknown led strip event: 0
I (494) MCP: Add tool: self.led_strip.get_brightness
I (504) MCP: Add tool: self.led_strip.set_brightness
I (504) MCP: Add tool: self.led_strip.set_single_color
I (514) MCP: Add tool: self.led_strip.set_all_color
I (514) MCP: Add tool: self.led_strip.blink
I (524) MCP: Add tool: self.led_strip.scroll
I (534) gc2145: Detected Camera sensor PID=0x2145
D (754) Esp32Camera: VIDIOC_QUERYCAP: driver=DVP, card=DVP, bus_info=esp32s3:DVP, version=0x00010301, capabilities=0x84200001, device_caps=0x04200001
D (754) Esp32Camera: VIDIOC_G_FMT: pixelformat=0x50424752, width=640, height=480
D (764) Esp32Camera: FOURCC: 'RGBP'
D (764) Esp32Camera: VIDIOC_ENUM_FMT: pixelformat=0x50424752, description=RGB 5-6-5
D (774) Esp32Camera: FOURCC: 'RGBP'
D (774) Esp32Camera: selected pixel format: 0x50424752
I (784) Esp32Camera: Camera init success
I (784) Application: STATE: starting
W (784) i2s_common: GPIO 0 is not usable, maybe conflict with others
I (794) K10AudioCodec: Duplex channels created
I (814) K10AudioCodec: DF-K10 AudioDevice initialized
I (814) I2S_IF: channel mode 2 bits:16/16 channel:4 mask:3
I (814) I2S_IF: TDM Mode 0 bits:16/16 channel:4 sample_rate:24000 mask:3
I (814) I2S_IF: channel mode 0 bits:16/16 channel:4 mask:3
I (824) I2S_IF: STD Mode 1 bits:32/32 channel:4 sample_rate:24000 mask:0
I (834) Adev_Codec: Open codec device OK
I (834) AudioCodec: Set input enable to true
I (834) AudioCodec: Set output volume to 70
I (844) AudioCodec: Set output enable to true
I (844) AudioCodec: Audio codec started
I (854) OpusResampler: Resampler configured with input sample rate 24000 and output sample rate 16000
I (854) OpusResampler: Resampler configured with input sample rate 24000 and output sample rate 16000
I (874) pp: pp rom version: e7ae62f
I (874) net80211: net80211 rom version: e7ae62f
I (884) wifi:wifi driver task: 3fce00fc, prio:23, stack:6144, core=0
I (884) wifi:wifi firmware version: 14da9b7
I (884) wifi:wifi certification version: v7.0
I (884) wifi:config NVS flash: disabled
I (894) wifi:config nano formatting: enabled
I (894) wifi:Init data frame dynamic rx buffer num: 6
I (904) wifi:Init dynamic rx mgmt buffer num: 5
I (904) wifi:Init management short buffer num: 32
I (904) wifi:Init dynamic tx buffer num: 32
I (914) wifi:Init static tx FG buffer num: 2
I (914) wifi:Init static rx buffer size: 1600
I (924) wifi:Init static rx buffer num: 3
I (924) wifi:Init dynamic rx buffer num: 6
I (934) wifi_init: rx ba win: 3
I (934) wifi_init: accept mbox: 6
I (934) wifi_init: tcpip mbox: 16
I (934) wifi_init: udp mbox: 6
I (944) wifi_init: tcp mbox: 6
I (944) wifi_init: tcp tx win: 5760
I (944) wifi_init: tcp rx win: 5760
I (954) wifi_init: tcp mss: 1440
I (954) phy_init: phy_version 701,f4f1da3a,Mar 3 2025,15:50:10
I (994) wifi:mode : sta (e4:b0:63:b9:bc:98)
I (994) wifi:enable tsf
I (3404) WifiStation: Found AP: HiWiFi, BSSID: d4:ee:07:25:c3:1a, RSSI: -35, Channel: 8, Authmode: 4
W (3404) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2
I (4324) wifi:new:<8,0>, old:<1,0>, ap:<255,255>, sta:<8,0>, prof:1, snd_ch_cfg:0x0
I (4324) wifi:state: init -> auth (0xb0)
I (4334) wifi:state: auth -> assoc (0x0)
I (4334) wifi:state: assoc -> run (0x10)
I (4544) wifi:connected with HiWiFi, aid = 1, channel 8, BW20, bssid = d4:ee:07:25:c3:1a
I (4544) wifi:security: WPA2-PSK, phy: bgn, rssi: -35
I (4554) wifi:pm start, type: 1

I (4554) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us
I (4564) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
I (4574) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (4674) wifi:[ADDBA]RX DELBA, reason:39, delete tid:0, initiator:0(recipient)
I (5584) WifiStation: Got IP: 192.168.199.122
I (5584) esp_netif_handlers: sta ip: 192.168.199.122, mask: 255.255.255.0, gw: 192.168.199.1
I (5584) Assets: The storage free size is 21824 KB
I (5584) Assets: The partition size is 8192 KB
I (5684) Assets: The checksum calculation time is 91 ms
create static modelsI (5684) MODEL_LOADER: Successfully load srmodels
I (5684) Assets: Refreshing display theme...
W (5734) EmojiCollection: Emoji not found: microchip_ai
I (5734) Application: STATE: activating
I (5734) Ota: Current version: 2.0.4
I (5874) esp-x509-crt-bundle: Certificate validated
I (6234) Ota: Current is the latest version
I (6234) Ota: Running partition: ota_0
I (6234) MCP: Add tool: self.get_device_status
I (6234) MCP: Add tool: self.audio_speaker.set_volume
I (6234) MCP: Add tool: self.screen.set_theme
I (6244) MCP: Add tool: self.camera.take_photo
I (6244) MCP: Add tool: self.get_system_info [user]
I (6244) MCP: Add tool: self.reboot [user]
I (6254) MCP: Add tool: self.upgrade_firmware [user]
I (6254) MCP: Add tool: self.screen.get_info [user]
I (6264) MCP: Add tool: self.screen.snapshot [user]
I (6264) MCP: Add tool: self.screen.preview_image [user]
I (6274) MCP: Add tool: self.assets.set_download_url [user]
I (6274) MQTT: Connecting to endpoint mqtt.xiaozhi.me
I (6354) esp-x509-crt-bundle: Certificate validated
I (6654) MQTT: Connected to endpoint
I (6654) SystemInfo: free sram: 115167 minimal sram: 114571
I (6654) Application: STATE: idle
I (6654) AfeWakeWord: Model 0: wn9_nihaoxiaozhi_tts
I (6664) AFE_CONFIG: Set WakeNet Model: wn9_nihaoxiaozhi_tts
MC Quantized wakenet9: wakenet9l_tts1h8_你好小智_3_0.631_0.635, tigger:v4, mode:0, p:0, (Aug 11 2025 15:20:50)
I (6774) AFE: AFE Version: (1MIC_V250121)
I (6774) AFE: Input PCM Config: total 2 channels(1 microphone, 1 playback), sample rate:16000
I (6784) AFE: AFE Pipeline: [input] -> |AEC(SR_HIGH_PERF)| -> -> |VAD(WebRTC)| -> |WakeNet(wn9_nihaoxiaozhi_tts,)| -> [output]
I (6794) AfeWakeWord: Audio detection task started, feed size: 512 fetch size: 512
I (6804) AudioService: OpusHead: version=1, channels=1, sample_rate=16000
I (6804) AudioService: Resampling audio from 16000 to 24000
I (6814) OpusResampler: Resampler configured with input sample rate 16000 and output sample rate 24000
I (6834) main_task: Returned from app_main()
微信图片_20251103121051_9314_199
ScreenShot_2025-11-03_114611_139
ScreenShot_2025-11-03_114510_879

@WangYuxin-esp
Copy link

没有YUV选项,只有RGB ,mcp拍照 能拍照,但花屏,颜色,形状不对,开启和关闭颜色swap没什么变化,更换更高的分辨率也同样。

启用 XIAOZHI_ENABLE_CAMERA_DEBUG_MODE 截一下初始化阶段的 log,另外传一下花屏的图片

ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x15 (USB_UART_CHIP_RESET),boot:0x8 (SPI_FAST_FLASH_BOOT) Saved PC:0x403834fa --- 0x403834fa: esp_cpu_wait_for_intr at E:/IDF_home/idf55_offline/frameworks/esp-idf-v5.5.1/components/esp_hw_support/cpu.c:64

SPIWP:0xee mode:DIO, clock div:1 load:0x3fce2820,len:0x548 load:0x403c8700,len:0xc3c load:0x403cb700,len:0x2e70 entry 0x403c8908 I (26) octal_psram: vendor id : 0x0d (AP) I (26) octal_psram: dev id : 0x02 (generation 3) I (26) octal_psram: density : 0x03 (64 Mbit) I (28) octal_psram: good-die : 0x01 (Pass) I (32) octal_psram: Latency : 0x01 (Fixed) I (36) octal_psram: VCC : 0x01 (3V) I (40) octal_psram: SRF : 0x01 (Fast Refresh) I (45) octal_psram: BurstType : 0x01 (Hybrid Wrap) I (50) octal_psram: BurstLen : 0x01 (32 Byte) I (54) octal_psram: Readlatency : 0x02 (10 cycles@Fixed) I (59) octal_psram: DriveStrength: 0x00 (1/1) I (64) MSPI Timing: PSRAM timing tuning index: 5 I (68) esp_psram: Found 8MB PSRAM device I (71) esp_psram: Speed: 80MHz I (74) cpu_start: Multicore app I (89) cpu_start: Pro cpu start user code I (89) cpu_start: cpu freq: 240000000 Hz I (89) app_init: Application information: I (89) app_init: Project name: xiaozhi I (92) app_init: App version: 2.0.4 I (96) app_init: Compile time: Nov 3 2025 11:53:54 I (101) app_init: ELF file SHA256: e25f2ec80... I (105) app_init: ESP-IDF: v5.5.1 I (109) efuse_init: Min chip rev: v0.0 I (113) efuse_init: Max chip rev: v0.99 I (117) efuse_init: Chip rev: v0.2 I (121) heap_init: Initializing. RAM available for dynamic allocation: I (127) heap_init: At 3FCB01F0 len 00039520 (229 KiB): RAM I (132) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM I (137) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM I (143) heap_init: At 600FE000 len 00001FD8 (7 KiB): RTCRAM I (148) esp_psram: Adding pool of 8192K of PSRAM memory to heap allocator I (155) spi_flash: detected chip: gd I (158) spi_flash: flash io: qio I (161) sleep_gpio: Configure to isolate all GPIO pins in sleep state I (167) sleep_gpio: Enable automatic switching of GPIO sleep configuration I (174) main_task: Started on CPU0 I (184) esp_psram: Reserving pool of 64K of internal memory for DMA/internal allocations I (184) main_task: Calling app_main() I (214) Board: UUID=d8ad865a-6a08-4cd0-b587-835c7ebe7d32 SKU=df-k10 I (214) io_expander: Index[0] | Dir[In] | In[0] | Out[1] I (214) io_expander: Index[1] | Dir[In] | In[1] | Out[1] I (214) io_expander: Index[2] | Dir[In] | In[1] | Out[1] I (224) io_expander: Index[3] | Dir[In] | In[0] | Out[1] I (224) io_expander: Index[4] | Dir[In] | In[0] | Out[1] I (234) io_expander: Index[5] | Dir[In] | In[0] | Out[1] I (234) io_expander: Index[6] | Dir[In] | In[0] | Out[1] I (244) io_expander: Index[7] | Dir[In] | In[0] | Out[1] I (244) io_expander: Index[8] | Dir[In] | In[0] | Out[1] I (254) io_expander: Index[9] | Dir[In] | In[0] | Out[1] I (254) io_expander: Index[10] | Dir[In] | In[0] | Out[1] I (264) io_expander: Index[11] | Dir[In] | In[0] | Out[1] I (264) io_expander: Index[12] | Dir[In] | In[1] | Out[1] I (274) io_expander: Index[13] | Dir[In] | In[0] | Out[1] I (274) io_expander: Index[14] | Dir[In] | In[0] | Out[1] I (284) io_expander: Index[15] | Dir[In] | In[1] | Out[1] I (284) ili9341: LCD panel create success, version: 1.2.0 I (414) Display: Power management not supported I (474) LcdDisplay: Turning display on I (474) LcdDisplay: Initialize LVGL library I (474) LcdDisplay: Use 2MB of PSRAM for image cache I (474) LcdDisplay: Initialize LVGL port I (484) LcdDisplay: Adding LCD display I (484) LVGL: Starting LVGL task I (494) button: IoT Button Version: 4.1.4 W (494) CircularStrip: Unknown led strip event: 0 I (494) MCP: Add tool: self.led_strip.get_brightness I (504) MCP: Add tool: self.led_strip.set_brightness I (504) MCP: Add tool: self.led_strip.set_single_color I (514) MCP: Add tool: self.led_strip.set_all_color I (514) MCP: Add tool: self.led_strip.blink I (524) MCP: Add tool: self.led_strip.scroll I (534) gc2145: Detected Camera sensor PID=0x2145 D (754) Esp32Camera: VIDIOC_QUERYCAP: driver=DVP, card=DVP, bus_info=esp32s3:DVP, version=0x00010301, capabilities=0x84200001, device_caps=0x04200001 D (754) Esp32Camera: VIDIOC_G_FMT: pixelformat=0x50424752, width=640, height=480 D (764) Esp32Camera: FOURCC: 'RGBP' D (764) Esp32Camera: VIDIOC_ENUM_FMT: pixelformat=0x50424752, description=RGB 5-6-5 D (774) Esp32Camera: FOURCC: 'RGBP' D (774) Esp32Camera: selected pixel format: 0x50424752 I (784) Esp32Camera: Camera init success I (784) Application: STATE: starting W (784) i2s_common: GPIO 0 is not usable, maybe conflict with others I (794) K10AudioCodec: Duplex channels created I (814) K10AudioCodec: DF-K10 AudioDevice initialized I (814) I2S_IF: channel mode 2 bits:16/16 channel:4 mask:3 I (814) I2S_IF: TDM Mode 0 bits:16/16 channel:4 sample_rate:24000 mask:3 I (814) I2S_IF: channel mode 0 bits:16/16 channel:4 mask:3 I (824) I2S_IF: STD Mode 1 bits:32/32 channel:4 sample_rate:24000 mask:0 I (834) Adev_Codec: Open codec device OK I (834) AudioCodec: Set input enable to true I (834) AudioCodec: Set output volume to 70 I (844) AudioCodec: Set output enable to true I (844) AudioCodec: Audio codec started I (854) OpusResampler: Resampler configured with input sample rate 24000 and output sample rate 16000 I (854) OpusResampler: Resampler configured with input sample rate 24000 and output sample rate 16000 I (874) pp: pp rom version: e7ae62f I (874) net80211: net80211 rom version: e7ae62f I (884) wifi:wifi driver task: 3fce00fc, prio:23, stack:6144, core=0 I (884) wifi:wifi firmware version: 14da9b7 I (884) wifi:wifi certification version: v7.0 I (884) wifi:config NVS flash: disabled I (894) wifi:config nano formatting: enabled I (894) wifi:Init data frame dynamic rx buffer num: 6 I (904) wifi:Init dynamic rx mgmt buffer num: 5 I (904) wifi:Init management short buffer num: 32 I (904) wifi:Init dynamic tx buffer num: 32 I (914) wifi:Init static tx FG buffer num: 2 I (914) wifi:Init static rx buffer size: 1600 I (924) wifi:Init static rx buffer num: 3 I (924) wifi:Init dynamic rx buffer num: 6 I (934) wifi_init: rx ba win: 3 I (934) wifi_init: accept mbox: 6 I (934) wifi_init: tcpip mbox: 16 I (934) wifi_init: udp mbox: 6 I (944) wifi_init: tcp mbox: 6 I (944) wifi_init: tcp tx win: 5760 I (944) wifi_init: tcp rx win: 5760 I (954) wifi_init: tcp mss: 1440 I (954) phy_init: phy_version 701,f4f1da3a,Mar 3 2025,15:50:10 I (994) wifi:mode : sta (e4:b0:63:b9:bc:98) I (994) wifi:enable tsf I (3404) WifiStation: Found AP: HiWiFi, BSSID: d4:ee:07:25:c3:1a, RSSI: -35, Channel: 8, Authmode: 4 W (3404) wifi:Password length matches WPA2 standards, authmode threshold changes from OPEN to WPA2 I (4324) wifi:new:<8,0>, old:<1,0>, ap:<255,255>, sta:<8,0>, prof:1, snd_ch_cfg:0x0 I (4324) wifi:state: init -> auth (0xb0) I (4334) wifi:state: auth -> assoc (0x0) I (4334) wifi:state: assoc -> run (0x10) I (4544) wifi:connected with HiWiFi, aid = 1, channel 8, BW20, bssid = d4:ee:07:25:c3:1a I (4544) wifi:security: WPA2-PSK, phy: bgn, rssi: -35 I (4554) wifi:pm start, type: 1

I (4554) wifi:dp: 1, bi: 102400, li: 3, scale listen interval from 307200 us to 307200 us I (4564) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000 I (4574) wifi:AP's beacon interval = 102400 us, DTIM period = 1 I (4674) wifi:[ADDBA]RX DELBA, reason:39, delete tid:0, initiator:0(recipient) I (5584) WifiStation: Got IP: 192.168.199.122 I (5584) esp_netif_handlers: sta ip: 192.168.199.122, mask: 255.255.255.0, gw: 192.168.199.1 I (5584) Assets: The storage free size is 21824 KB I (5584) Assets: The partition size is 8192 KB I (5684) Assets: The checksum calculation time is 91 ms create static modelsI (5684) MODEL_LOADER: Successfully load srmodels I (5684) Assets: Refreshing display theme... W (5734) EmojiCollection: Emoji not found: microchip_ai I (5734) Application: STATE: activating I (5734) Ota: Current version: 2.0.4 I (5874) esp-x509-crt-bundle: Certificate validated I (6234) Ota: Current is the latest version I (6234) Ota: Running partition: ota_0 I (6234) MCP: Add tool: self.get_device_status I (6234) MCP: Add tool: self.audio_speaker.set_volume I (6234) MCP: Add tool: self.screen.set_theme I (6244) MCP: Add tool: self.camera.take_photo I (6244) MCP: Add tool: self.get_system_info [user] I (6244) MCP: Add tool: self.reboot [user] I (6254) MCP: Add tool: self.upgrade_firmware [user] I (6254) MCP: Add tool: self.screen.get_info [user] I (6264) MCP: Add tool: self.screen.snapshot [user] I (6264) MCP: Add tool: self.screen.preview_image [user] I (6274) MCP: Add tool: self.assets.set_download_url [user] I (6274) MQTT: Connecting to endpoint mqtt.xiaozhi.me I (6354) esp-x509-crt-bundle: Certificate validated I (6654) MQTT: Connected to endpoint I (6654) SystemInfo: free sram: 115167 minimal sram: 114571 I (6654) Application: STATE: idle I (6654) AfeWakeWord: Model 0: wn9_nihaoxiaozhi_tts I (6664) AFE_CONFIG: Set WakeNet Model: wn9_nihaoxiaozhi_tts MC Quantized wakenet9: wakenet9l_tts1h8_你好小智_3_0.631_0.635, tigger:v4, mode:0, p:0, (Aug 11 2025 15:20:50) I (6774) AFE: AFE Version: (1MIC_V250121) I (6774) AFE: Input PCM Config: total 2 channels(1 microphone, 1 playback), sample rate:16000 I (6784) AFE: AFE Pipeline: [input] -> |AEC(SR_HIGH_PERF)| -> -> |VAD(WebRTC)| -> |WakeNet(wn9_nihaoxiaozhi_tts,)| -> [output] I (6794) AfeWakeWord: Audio detection task started, feed size: 512 fetch size: 512 I (6804) AudioService: OpusHead: version=1, channels=1, sample_rate=16000 I (6804) AudioService: Resampling audio from 16000 to 24000 I (6814) OpusResampler: Resampler configured with input sample rate 16000 and output sample rate 24000 I (6834) main_task: Returned from app_main() 微信图片_20251103121051_9314_199 ScreenShot_2025-11-03_114611_139 ScreenShot_2025-11-03_114510_879

XCLK 配置小些,试试能不能成功。

@genvex
Copy link

genvex commented Nov 3, 2025

config.h里面默认20M,调到10-5M有好转,但还是偏白,极易过曝。
没有原来的 camera库好用。
微信图片_20251103202632_131_11

@laride
Copy link
Collaborator Author

laride commented Nov 4, 2025

config.h里面默认20M,调到10-5M有好转,但还是偏白,极易过曝。
没有原来的 camera库好用。

可以试下 https://github.com/espressif/esp-video-components/tree/master/esp_video/examples/simple_video_server 这个 example 排除一下其他情况,照片看上去可能不是过曝

@laride
Copy link
Collaborator Author

laride commented Nov 4, 2025

config.h里面默认20M,调到10-5M有好转,但还是偏白,极易过曝。

试一下使用 CAMERA_GC2145_DVP_RGB565_800X600_20FPS

@genvex
Copy link

genvex commented Nov 4, 2025

config.h里面默认20M,调到10-5M有好转,但还是偏白,极易过曝。

试一下使用 CAMERA_GC2145_DVP_RGB565_800X600_20FPS

Uploading 微信图片_20251104222451_135_11.jpg…

@genvex
Copy link

genvex commented Nov 4, 2025

config.h里面默认20M,调到10-5M有好转,但还是偏白,极易过曝。

试一下使用 CAMERA_GC2145_DVP_RGB565_800X600_20FPS

稍微好些,偏白,能识别到大件物体

@laride
Copy link
Collaborator Author

laride commented Nov 5, 2025

config.h里面默认20M,调到10-5M有好转,但还是偏白,极易过曝。

试一下使用 CAMERA_GC2145_DVP_RGB565_800X600_20FPS

稍微好些,偏白,能识别到大件物体

我借了一个行空板 K10,它的屏幕显示会偏白,选800x600时从小智后台聊天记录里看到的图片是正常的

@genvex
Copy link

genvex commented Nov 5, 2025

config.h里面默认20M,调到10-5M有好转,但还是偏白,极易过曝。

试一下使用 CAMERA_GC2145_DVP_RGB565_800X600_20FPS

稍微好些,偏白,能识别到大件物体

我借了一个行空板 K10,它的屏幕显示会偏白,选800x600时从小智后台聊天记录里看到的图片是正常的

也可以刷个 1.9的对比下效果

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for MIPI CSI camera

6 participants